package org.yy.controller;

import org.apache.dubbo.config.annotation.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.yy.service.MailService;

@RestController
public class MailController {

    @Reference(timeout = 5000)
    MailService mailService;

    @RequestMapping("/email/{email}/{code}")
    public Boolean email(@PathVariable String email, @PathVariable String code) {
        return mailService.sendSimpleMail(email, "测试验证码", code);
    }
}
